package com.wzh.glsc.cart.service;

import com.wzh.glsc.cart.vo.CartItemVo;
import com.wzh.glsc.cart.vo.CartVo;

import java.util.List;
import java.util.concurrent.ExecutionException;

/**
 * @author xiaoming
 * @PackageName:com.wzh.glsc.cart.service
 * @ClassName:@{NAME}
 * @Description:
 * @date:@{DATE}@{TIME}
 */
public interface CartService {

   CartItemVo addCart(Long skuId, Integer num) throws ExecutionException, InterruptedException;

   /**
    * 查询购物项
    * @param skuId 商品id
    * @return 购物项
    */
   CartItemVo queryCartItemBySkuId(Long skuId);

   /**
    * 查询购物车
    * @return
    * @throws ExecutionException
    * @throws InterruptedException
    */
   CartVo getCartList() throws ExecutionException, InterruptedException;

   void clearCart(String key);

   void countItem(Long skuId, Integer num);

   void deleteItem(Long skuId);

   void checkItem(Long skuId, Integer checked);

   List<CartItemVo> checkedItem();
}
